class RecordSet
  def get_csv
    csv = ""
    self.instance_variables.each_with_index do |var, index|
      csv.concat "," unless index == 0
      attribute = var.to_s.gsub("@","")
      next if attribute == "RowNumber"
      value = self.send(attribute).to_s
      value = " " if value.empty?
      csv.concat "\""
      csv.concat value
      csv.concat "\""
    end
    csv
  end
end